import { ChevronLeft, ChevronRight } from "lucide-react"; import DocsBreadcrumb from "../../components/Breadcrumb"; import Pagination from "../../components/Pagination"; import { Typography } from "../../components/Typography"; import EditWith from "../../components/EditWith"; import { formatDate2 } from "../../node/utils"; import type { TocItem } from "../../node/types"; import { Footer } from "../../components/Footer"; import Toc from "../../components/Toc"; interface DocsPageProps { slug: string[]; title: string; description?: string; date?: string; /** SSR'd MDX content HTML — rendered as its own root so client hydration * (separate island root) matches useId-based ids. */ content: string; tocs: TocItem[]; filePath: string; repoUrl?: string; /** Build-time slug keying into the bundled mdxModules manifest (client.ts). */ mdxSlug?: string; /** Dev-only pre-compiled source for the legacy MDXRemote eval path. */ compiledSource?: string; } export default function DocsPage({ slug, title, description, date, content, tocs, filePath, repoUrl, mdxSlug, compiledSource, }: DocsPageProps) { const pathname = slug.join("/"); const tocsJson = JSON.stringify(tocs); return (
{/* Mobile bar - island */}
0 ? "flex-[7]" : "mx-auto max-w-[820px]"} px-4 py-6 lg:px-12 lg:py-10`} >

{title}

{description && (

{description}

)}
{compiledSource && (